package com.hound.mq.produce;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * mq 消息生产者，发送方
 * Created by lupeng on 2018/4/3.
 */
//@Component
//public class HelloSender {
//
//    @Autowired
//    private AmqpTemplate template;
//
//    public void send(){
//        String sendMsg = "hello1 " + new Date();
//        System.out.println("Sender1 : " + sendMsg);
//        this.template.convertAndSend("hello", sendMsg);
//    }
//}
